import random
global comp_point,my_point,ch,ch1,ch2,ch3

print ("WELCOME TO LADY LION HUNTER GAME")
comp_point=0
my_point=0
while True:
    list=["LADY","LION","HUNTER"]
    print ("Press 1 to read the rules to start the game \nPress 2 to exit")
    ch=int(input())
    if (ch==1):
        print ("RULES:\n1. Press either 1 or 2 or 3.\n2. 1 denotes LADY.\n3. 2 denotes LION.\n4. 3 denotes HUNTER.\n5. LION eats the LADY. So LION wins against LADY.\n6. HUNTER shoots the LION. SO HUNTER wins against the LION.\n7. LADY is HUNTER's wife. So LADY wins against the HUNTER.\n8. Fastest to score a 5 in this game WINS.\n9. Press 0 to exit.")
        print ("STARTING GAME:")
        while True:     
            print("Press 1 or 2 or 3")
            ch1=int(input())
            if (ch1==1):
                print ("LADY")
                print(random.choice(list))
                if (random.choice(list)=="LADY"):
                    print ("DRAW")
                elif (random.choice(list)=="LION"):
                    print ("LION wins. You lose a point.")
                    comp_point=comp_point+1
                    if (comp_point==5):
                        print ("COMPUTER WINS")
                        while True:
                            print("Press 1 to play again\nPress 2 to exit")
                            ch3=int(input())
                            if (ch3==1): break
                            elif (ch3==2): exit(0)
                            else:   
                                print ("Invalid choice")
                                continue                        
                elif (random.choice(list)=="HUNTER"):
                    print ("LADY wins.You get a point.")    
                    my_point=my_point+1;
                    if (my_point==5):
                        print ("YOU WIN")
                        while True:
                            print("Press 1 to play again\nPress 2 to exit")
                            ch3=int(input())
                            if (ch3==1): break
                            elif (ch3==2): exit(0)
                            else: 
                                print ("Invalid choice")
                                continue                
            elif (ch1==2):
                print ("LION")
                print(random.choice(list))
                if (random.choice(list)=="LION"): 
                    print ("DRAW")
                elif (random.choice(list)=="HUNTER"):
                    print ("HUNTER wins. You lose a point.")
                    comp_point=comp_point+1
                    if (comp_point==5):
                        print ("COMPUTER WINS")
                        while True:
                            print("Press 1 to play again\nPress 2 to exit")
                            ch3=int(input())
                            if (ch3==1): break
                            elif (ch3==2): exit(0)
                            else:   
                                print ("Invalid choice")
                                continue        
                elif (random.choice(list)=="LADY"):
                    print ("LION wins.You get a point.")    
                    my_point=my_point+1;
                    if (my_point==5):
                        print ("YOU WIN")
                        while True:
                            print("Press 1 to play again\nPress 2 to exit")
                            ch3=int(input())
                            if (ch3==1): break
                            elif (ch3==2): exit(0)
                            else: 
                                print ("Invalid choice")
                                continue
            elif (ch1==3):
                print ("HUNTER")
                print(random.choice(list))
                if (random.choice(list)=="HUNTER"):print ("DRAW")
                elif (random.choice(list)=="LADY"):
                    print ("LADY wins. You lose a point.")
                    comp_point=comp_point+1
                    if (comp_point==5):
                        print ("COMPUTER WINS")
                        while True:
                            print("Press 1 to play again\nPress 2 to exit")
                            ch3=int(input())
                            if (ch3==1): break
                            elif (ch3==2): exit(0)
                            else:   
                                print ("Invalid choice")
                                continue                 
                elif (random.choice(list)=="LION"):
                    print ("HUNTER wins.You get a point.")  
                    my_point=my_point+1;
                    if (my_point==5):
                        print ("YOU WIN")
                        while True:
                            print("Press 1 to play again\nPress 2 to exit")
                            ch3=int(input())
                            if (ch3==1): break
                            elif (ch3==2): exit(0)
                            else: 
                                print ("Invalid choice")
                                continue            
            elif (ch1==0):exit(0)
    elif (ch==2): exit(0)
    else:
        print ("Please select the correct option")
        continue	 						